//引入 useRoutes Hook，实现路由管理。
import { BrowserRouter, useRoutes } from 'react-router-dom';
//获取所有路由
import routes from '~react-pages';




const App = () => {
    const Routers = () => {
        //返回自动生成的路由列表
        return useRoutes(routes);
    }

    return (
        <>
            <BrowserRouter>
                <Routers />
            </BrowserRouter>
        </>
    );
};

export default App;
